package com.qys.livesMall.shop.modal.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.qys.livesMall.common.serial.LocalDateTimeToTimestampSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @packageName:
 * @className:ShopGoodsDto
 * @Description:
 * @author:guomx
 * @date:2023/7/2210:01
 */
@Data
public class ShopGoodsDto {
    private Long id;
    private Long shopId;
    private Long stocksId;
    @Schema(description = "店铺名字")
    private String shopName;
    @Schema(description = "用户名字")
    private String userName;
    @Schema(description = "商品名字")
    private String goodsName;
    @Schema(description = "商品名字")
    private String skuName;
    @Schema(description = "出货价")
    private BigDecimal price;
    @Schema(description = "成本价")
    private BigDecimal costPrice;
    @Schema(description = "库存")
    private Integer num;
    @Schema(description = "支付方式")
    private String payType;
    @Schema(description = "主播销售")
    private Integer anchorNum;
    @Schema(description = "虚拟销售")
    private Integer navyNum;
    @Schema(description = "总价")
    private BigDecimal totalPrice;
    @JsonSerialize(using = LocalDateTimeToTimestampSerializer.class)
    @JsonFormat(shape = JsonFormat.Shape.NUMBER)
    @Schema(description = "下单时间")
    private LocalDateTime createTime;
    @Schema(description = "状态")
    private boolean status;
}
